using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication2.Models.Mapping
{
    public class so_newpatphyMap : EntityTypeConfiguration<so_newpatphy>
    {
        public so_newpatphyMap()
        {
            // Primary Key
            this.HasKey(t => t.company);

            // Properties
            this.Property(t => t.case__)
                .HasMaxLength(15);

            this.Property(t => t.Patient)
                .HasMaxLength(110);

            this.Property(t => t.company)
                .IsRequired()
                .HasMaxLength(35);

            // Table & Column Mappings
            this.ToTable("so_newpatphy");
            this.Property(t => t.case__).HasColumnName("case_#");
            this.Property(t => t.Patient).HasColumnName("Patient");
            this.Property(t => t.company).HasColumnName("company");
            this.Property(t => t.visite_physician).HasColumnName("visite_physician");
        }
    }
}
